<template>
	<om-page :title="pageTitle">
		<view class="page__bd">
			<ot-table
				textAlign="left" 
				titleTextAlign="center" 
				:tableData="table.tableData" 
				:columns="table.tableColumns"
				:numWidth="600"
				:showBottomSum="true"
				:showUnit="false"
				@onClick="onClick"
			>
			</ot-table>
		</view>
	</om-page>
</template>

<script>
	export default {
		data() {
			return {
				pageTitle:"待付金额查询",
				table: {
					tableData: [],
					tableColumns: [
						{
							title: '项目名称',
							key: 'busName',
							width: 450,
							listenerClick: true,
							// isLink: {url: '/pages/search/paid-amount-search/paid-amount-show', params: ['busCode']}
						},
						{
							title: '未付金额',
							key: 'unpaid',
							width: 300,
							listenerClick: true,
							// isLink: {url: '/pages/search/paid-amount-search/paid-amount-show', params: ['busCode']}
						},
					],
				}
			};
		},
		methods: {
			getDataList(){
				let _that = this;
				_that.om.request("travelExpensesShow/getTotalUnpaid",{}).then(res=>{
					_that.table.tableData = res.value
				})
			},
			onClick(row){
				uni.navigateTo({
				    url: '/pages/search/paid-amount-search/paid-amount-show?busCode=' + row.busCode
				})
			}
		},
		onLoad() {
			let _that = this;
			
			uni.setNavigationBarTitle({
				title: '待付金额查询'
			});
			
			_that.getDataList()
		},
	};
</script>

<style>
	
</style>                                                                                            